<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="ot" uri="http://www.ideyatech.com/tides"%>
<%@ taglib prefix="idy" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%>

<div class="preview-container">
	<div class="preview-container">
		<h4 class="oranged text-center">${program.name}</h4>
		<div><strong>Description</strong></div>
		<div>
			${program.description}<c:if test="${empty program.description}"><span class="muted">Not specified</span></c:if>
		</div>
		<br/>
		<c:choose>
			<c:when test="${program.resultStatus.value eq 'New' or program.resultStatus.value eq 'Resolving'}">
				<div><strong>Goals</strong></div>
				<div>
					${program.goal}<c:if test="${empty program.goal}"><span class="muted">Not specified</span></c:if>
				</div>
				<br/>
			</c:when>
			<c:otherwise>
				<div><strong>Result</strong></div>
				<div>
					<span class="oranged">${program.resultStatus.value}</span> - ${program.resultSummary}<c:if test="${empty program.resultSummary}"><i>Result description not specified</i></c:if>
				</div>
				<br/>
			</c:otherwise>
		</c:choose>
		<div class="text-center"><a href="${url_context}/patient-program.jspx?id=${program.id}">View full details</a></div>
	</div>
</div>

<script type="text/javascript">
	$(document).ready(function(){
		$('.preview-container').fadeIn();
	});

</script>